  


//选择状态 =》 里面的内容 =》使用的时候决定的
import React, { useState } from 'react';
import type { RadioChangeEvent } from 'antd';
import { Radio } from 'antd';

//基本的样式
  function  SelectStatus(props:any){
    let [value, setValue] = useState(1);

    const onChange = (e: RadioChangeEvent) => {
  
      setValue(e.target.value);
      props.getStatus(e.target.value)
    };
  
    return (
        <div>
      <Radio.Group onChange={onChange} value={value}>
        {/* <Radio value={1}>A</Radio>
        <Radio value={2}>B</Radio>
        <Radio value={3}>C</Radio>
        <Radio value={4}>D</Radio> */}
        {props.statusList.map((item:any,index:number)=>{
             return (
                <Radio value={item.status} key={index}>{item.name}</Radio>
             )
        })}
      </Radio.Group>
      </div>
    );
  }


  export default SelectStatus